﻿@{
    char? azIdx = Request.QueryParam<Char?>("azIdx");
    var charList = T(Res.Name("Chars"));
    var act = Loc.Act("Index").Use("view", "sortBy", "sortDesc").Localized();
    foreach(var i in charList)
    {
        if(i == '|')
        {
            <span class="separator">@i</span>
        }
        else if(i == '#')
        {
            <a class="@(!azIdx.HasValue ? "current" : String.Empty)" href="@Url.Action(act)">@i</a>
        }
        else
        {
            <a class="@(azIdx.HasValue && azIdx == i ? "current" : String.Empty)" href="@Url.Action(act.Copy().Set("azIdx", i))">@i</a>
        }
    }
}
